nonlinux_utime
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Tue, 11 Sep 2018 10:29:28 +0000 (11:29 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Tue, 11 Sep 2018 10:29:28 +0000 (11:29 +0100)
Gbp-Pq: Name nonlinux_utime.diff

qmake/library/ioutils.cpp
src/corelib/io/qfilesystemengine_unix.cpp

index fd84dff59d613bf5c8c2b7bccd3b5a823f7e0c01..3db298a24cc8ab9f5d59c7262bd13b3e171352da 100644 (file)
@@ -222,7 +222,7 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
         *errorString = fL1S("Cannot stat() reference file %1: %2.").arg(referenceFileName, fL1S(strerror(errno)));
         return false;
     }
-#    if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L
+#    if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L && defined(UTIME_NOW)
     const struct timespec times[2] = { { 0, UTIME_NOW }, st.st_mtim };
     const bool utimeError = utimensat(AT_FDCWD, targetFileName.toLocal8Bit().constData(), times, 0) < 0;
 #    else
index 3e4f33a3ba55b9a5176286811930f7bbaa7767dd..9de17b772674e7ddfe5c8986d978b2e7d2fea35a 100644 (file)
@@ -1449,7 +1449,7 @@ bool QFileSystemEngine::setFileTime(int fd, const QDateTime &newDate, QAbstractF
         return false;
     }
 
-#if QT_CONFIG(futimens)
+#if QT_CONFIG(futimens) && defined(UTIME_OMIT)
     struct timespec ts[2];
 
     ts[0].tv_sec = ts[1].tv_sec = 0;